#include <vector>
#include <iostream>
#include <queue>
#include <sstream>

void parseStr(std::string str, std::vector<int> &lostv)
{
    std::istringstream iss(str);
    int tm;
    while (iss >> tm)
    {
        lostv.push_back(tm);
    }
}

int main()
{
    int min_avg_tm;
    std::cin >> min_avg_tm;
    std::cin.ignore();

    std::vector<int> lostv;
    std::string str;
    std::getline(std::cin, str);
    parseStr(str, lostv);

    std::vector<std::pair<int, int>> index_vec;
    int l = 0, r = 0;
    int max_tm = 0;
    int total = 0;
    while (r < lostv.size())
    {
        total += lostv[r];
        if (total <= (r - l + 1) * min_avg_tm)
        {
            if ((r - l + 1) == max_tm)
            {
                index_vec.push_back({l, r});
            }
            else if ((r - l + 1) > max_tm)
            {
                index_vec.clear();
                index_vec.push_back({l, r});
                max_tm = r - l + 1;
            }
        }
        else
        {
            while (l <= r)
            {
                total -= lostv[l];
                l++;
            }
        }
        r++;
    }

    for (int i = 0; i < index_vec.size(); i++)
    {
        std::cout << index_vec[i].first << "-" << index_vec[i].second << " ";
    }

    return 0;
}